public class Demo1 {
    public static void main(String[] args) throws InterruptedException {
        Thread thread = new Thread(() -> {
            for (int i = 0; i < 10; i++) {
               try {
                   System.out.println(Thread.currentThread().getName() + "我还存活");
                   System.out.println(Thread.currentThread().isAlive());
                   Thread.sleep(1000);
                } catch (InterruptedException e) {
                    throw new RuntimeException(e);
                }
            }
            System.out.println(Thread.currentThread().getName() + "我即将死去");
        },"111号线程~");

        thread.start();
        thread.join();
        System.out.println(thread.isAlive());
    }
}
